package thread_ex;

class Thread_ex1 extends Thread{
	public void run(){
		for(int i=1;i<=1000;i++){
			System.out.print("스레드1출력중..");
			if(i%10 == 0){
				System.out.println();
			}
			
		}
	}
}

class Thread_ex2 extends Thread{
	public void run(){
		for(int i=1;i<=1000;i++){
			System.out.print("스레드2출력중..");
			if(i%10 == 0){
				System.out.println();
			}
			
		}
	}
}

public class Test02_Thread2 {

	public static void main(String[] args) {
		Thread_ex1 te1 = new Thread_ex1();
		Thread_ex2 te2 = new Thread_ex2();
		
		te1.run();
		te2.run();
		
		for(int i=1;i<=1000;i++){
			System.out.print("일반출력중..");
			if(i%10 == 0){
				System.out.println();
			}
			
		}
		
	}

}
